3.12.28 \(\int \frac {1}{(a+i a \tan (e+f x)) (c+d \tan (e+f x))^{3/2}} \, dx\) [1128]

Optimal. Leaf size=205 \[ -\frac {i \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{2 a (c-i d)^{3/2} f}+\frac {(i c-4 d) \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )}{2 a (c+i d)^{5/2} f}+\frac {(c-5 i d) d}{2 a (c-i d) (c+i d)^2 f \sqrt {c+d \tan (e+f x)}}-\frac {1}{2 (i c-d) f (a+i a \tan (e+f x)) \sqrt {c+d \tan (e+f x)}} \]

[Out]

-1/2*I*arctanh((c+d*tan(f*x+e))^(1/2)/(c-I*d)^(1/2))/a/(c-I*d)^(3/2)/f+1/2*(I*c-4*d)*arctanh((c+d*tan(f*x+e))^
(1/2)/(c+I*d)^(1/2))/a/(c+I*d)^(5/2)/f+1/2*(c-5*I*d)*d/a/(c-I*d)/(c+I*d)^2/f/(c+d*tan(f*x+e))^(1/2)-1/2/(I*c-d
)/f/(c+d*tan(f*x+e))^(1/2)/(a+I*a*tan(f*x+e))

________________________________________________________________________________________

Rubi [A]
time = 0.33, antiderivative size = 205, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 6, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3633, 3610, 3620, 3618, 65, 214} \begin {gather*} \frac {d (c-5 i d)}{2 a f (c-i d) (c+i d)^2 \sqrt {c+d \tan (e+f x)}}-\frac {1}{2 f (-d+i c) (a+i a \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}-\frac {i \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{2 a f (c-i d)^{3/2}}+\frac {(-4 d+i c) \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )}{2 a f (c+i d)^{5/2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[1/((a + I*a*Tan[e + f*x])*(c + d*Tan[e + f*x])^(3/2)),x]

[Out]

((-1/2*I)*ArcTanh[Sqrt[c + d*Tan[e + f*x]]/Sqrt[c - I*d]])/(a*(c - I*d)^(3/2)*f) + ((I*c - 4*d)*ArcTanh[Sqrt[c
 + d*Tan[e + f*x]]/Sqrt[c + I*d]])/(2*a*(c + I*d)^(5/2)*f) + ((c - (5*I)*d)*d)/(2*a*(c - I*d)*(c + I*d)^2*f*Sq
rt[c + d*Tan[e + f*x]]) - 1/(2*(I*c - d)*f*(a + I*a*Tan[e + f*x])*Sqrt[c + d*Tan[e + f*x]])

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 3610

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b
*c - a*d)*((a + b*Tan[e + f*x])^(m + 1)/(f*(m + 1)*(a^2 + b^2))), x] + Dist[1/(a^2 + b^2), Int[(a + b*Tan[e +
f*x])^(m + 1)*Simp[a*c + b*d - (b*c - a*d)*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c
 - a*d, 0] && NeQ[a^2 + b^2, 0] && LtQ[m, -1]

Rule 3618

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[c*(
d/f), Subst[Int[(a + (b/d)*x)^m/(d^2 + c*x), x], x, d*Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m}, x] &&
NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && EqQ[c^2 + d^2, 0]

Rule 3620

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[(c
 + I*d)/2, Int[(a + b*Tan[e + f*x])^m*(1 - I*Tan[e + f*x]), x], x] + Dist[(c - I*d)/2, Int[(a + b*Tan[e + f*x]
)^m*(1 + I*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0]
&& NeQ[c^2 + d^2, 0] &&  !IntegerQ[m]

Rule 3633

Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_)/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-a
)*((c + d*Tan[e + f*x])^(n + 1)/(2*f*(b*c - a*d)*(a + b*Tan[e + f*x]))), x] + Dist[1/(2*a*(b*c - a*d)), Int[(c
 + d*Tan[e + f*x])^n*Simp[b*c + a*d*(n - 1) - b*d*n*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x
] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] &&  !GtQ[n, 0]

Rubi steps

\begin {align*} \int \frac {1}{(a+i a \tan (e+f x)) (c+d \tan (e+f x))^{3/2}} \, dx &=-\frac {1}{2 (i c-d) f (a+i a \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}+\frac {\int \frac {\frac {1}{2} a (2 i c-5 d)+\frac {3}{2} i a d \tan (e+f x)}{(c+d \tan (e+f x))^{3/2}} \, dx}{2 a^2 (i c-d)}\\ &=\frac {(c-5 i d) d}{2 a (c-i d) (c+i d)^2 f \sqrt {c+d \tan (e+f x)}}-\frac {1}{2 (i c-d) f (a+i a \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}+\frac {\int \frac {\frac {1}{2} a (c+3 i d) (2 i c+d)+\frac {1}{2} a d (i c+5 d) \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}} \, dx}{2 a^2 (i c-d) \left (c^2+d^2\right )}\\ &=\frac {(c-5 i d) d}{2 a (c-i d) (c+i d)^2 f \sqrt {c+d \tan (e+f x)}}-\frac {1}{2 (i c-d) f (a+i a \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}+\frac {\int \frac {1+i \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}} \, dx}{4 a (c-i d)}+\frac {(c+4 i d) \int \frac {1-i \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}} \, dx}{4 a (c+i d)^2}\\ &=\frac {(c-5 i d) d}{2 a (c-i d) (c+i d)^2 f \sqrt {c+d \tan (e+f x)}}-\frac {1}{2 (i c-d) f (a+i a \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}-\frac {(i c-4 d) \text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {c+i d x}} \, dx,x,-i \tan (e+f x)\right )}{4 a (c+i d)^2 f}-\frac {\text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {c-i d x}} \, dx,x,i \tan (e+f x)\right )}{4 a (i c+d) f}\\ &=\frac {(c-5 i d) d}{2 a (c-i d) (c+i d)^2 f \sqrt {c+d \tan (e+f x)}}-\frac {1}{2 (i c-d) f (a+i a \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}-\frac {\text {Subst}\left (\int \frac {1}{-1-\frac {i c}{d}+\frac {i x^2}{d}} \, dx,x,\sqrt {c+d \tan (e+f x)}\right )}{2 a (c-i d) d f}+\frac {(i (i c-4 d)) \text {Subst}\left (\int \frac {1}{-1+\frac {i c}{d}-\frac {i x^2}{d}} \, dx,x,\sqrt {c+d \tan (e+f x)}\right )}{2 a (c+i d)^2 d f}\\ &=-\frac {i \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{2 a (c-i d)^{3/2} f}+\frac {(i c-4 d) \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )}{2 a (c+i d)^{5/2} f}+\frac {(c-5 i d) d}{2 a (c-i d) (c+i d)^2 f \sqrt {c+d \tan (e+f x)}}-\frac {1}{2 (i c-d) f (a+i a \tan (e+f x)) \sqrt {c+d \tan (e+f x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 3.41, size = 297, normalized size = 1.45 \begin {gather*} \frac {\sec (e+f x) (\cos (f x)+i \sin (f x)) \left (-\frac {2 \left (-i \sqrt {-c+i d} \left (c^2+3 i c d+4 d^2\right ) \text {ArcTan}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {-c-i d}}\right )+i (-c-i d)^{5/2} \text {ArcTan}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {-c+i d}}\right )\right ) (\cos (e)+i \sin (e))}{(-c-i d)^{5/2} (-c+i d)^{3/2}}+\frac {2 \cos (e+f x) (i \cos (f x)+\sin (f x)) \left (\left (c^2-i c d-4 d^2\right ) \cos (e+f x)+(c-5 i d) d \sin (e+f x)\right ) \sqrt {c+d \tan (e+f x)}}{(c-i d) (c+i d)^2 (c \cos (e+f x)+d \sin (e+f x))}\right )}{4 f (a+i a \tan (e+f x))} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[1/((a + I*a*Tan[e + f*x])*(c + d*Tan[e + f*x])^(3/2)),x]

[Out]

(Sec[e + f*x]*(Cos[f*x] + I*Sin[f*x])*((-2*((-I)*Sqrt[-c + I*d]*(c^2 + (3*I)*c*d + 4*d^2)*ArcTan[Sqrt[c + d*Ta
n[e + f*x]]/Sqrt[-c - I*d]] + I*(-c - I*d)^(5/2)*ArcTan[Sqrt[c + d*Tan[e + f*x]]/Sqrt[-c + I*d]])*(Cos[e] + I*
Sin[e]))/((-c - I*d)^(5/2)*(-c + I*d)^(3/2)) + (2*Cos[e + f*x]*(I*Cos[f*x] + Sin[f*x])*((c^2 - I*c*d - 4*d^2)*
Cos[e + f*x] + (c - (5*I)*d)*d*Sin[e + f*x])*Sqrt[c + d*Tan[e + f*x]])/((c - I*d)*(c + I*d)^2*(c*Cos[e + f*x]
+ d*Sin[e + f*x]))))/(4*f*(a + I*a*Tan[e + f*x]))

________________________________________________________________________________________

Maple [A]
time = 0.35, size = 257, normalized size = 1.25

method result size
derivativedivides \(\frac {2 d^{2} \left (-\frac {-\frac {\left (c^{2}+d^{2}\right ) d \sqrt {c +d \tan \left (f x +e \right )}}{\left (i d +c \right ) \left (-d \tan \left (f x +e \right )+i d \right )}-\frac {\left (i c^{3}+i c \,d^{2}-4 c^{2} d -4 d^{3}\right ) \arctan \left (\frac {\sqrt {c +d \tan \left (f x +e \right )}}{\sqrt {-i d -c}}\right )}{\left (i d +c \right ) \sqrt {-i d -c}}}{4 d^{2} \left (i d +c \right )^{2} \left (i d -c \right )}+\frac {i}{\left (i c +d \right ) \left (i c -d \right ) \left (i d +c \right ) \sqrt {c +d \tan \left (f x +e \right )}}+\frac {\left (-i c^{2}+i d^{2}+2 c d \right ) \arctan \left (\frac {\sqrt {c +d \tan \left (f x +e \right )}}{\sqrt {i d -c}}\right )}{4 \left (i d -c \right )^{\frac {3}{2}} \left (i d +c \right )^{2} d^{2}}\right )}{f a}\) \(257\)
default \(\frac {2 d^{2} \left (-\frac {-\frac {\left (c^{2}+d^{2}\right ) d \sqrt {c +d \tan \left (f x +e \right )}}{\left (i d +c \right ) \left (-d \tan \left (f x +e \right )+i d \right )}-\frac {\left (i c^{3}+i c \,d^{2}-4 c^{2} d -4 d^{3}\right ) \arctan \left (\frac {\sqrt {c +d \tan \left (f x +e \right )}}{\sqrt {-i d -c}}\right )}{\left (i d +c \right ) \sqrt {-i d -c}}}{4 d^{2} \left (i d +c \right )^{2} \left (i d -c \right )}+\frac {i}{\left (i c +d \right ) \left (i c -d \right ) \left (i d +c \right ) \sqrt {c +d \tan \left (f x +e \right )}}+\frac {\left (-i c^{2}+i d^{2}+2 c d \right ) \arctan \left (\frac {\sqrt {c +d \tan \left (f x +e \right )}}{\sqrt {i d -c}}\right )}{4 \left (i d -c \right )^{\frac {3}{2}} \left (i d +c \right )^{2} d^{2}}\right )}{f a}\) \(257\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+I*a*tan(f*x+e))/(c+d*tan(f*x+e))^(3/2),x,method=_RETURNVERBOSE)

[Out]

2/f/a*d^2*(-1/4/d^2/(c+I*d)^2/(I*d-c)*(-(c^2+d^2)*d/(c+I*d)*(c+d*tan(f*x+e))^(1/2)/(-d*tan(f*x+e)+I*d)-(-4*c^2
*d-4*d^3+I*c^3+I*c*d^2)/(c+I*d)/(-I*d-c)^(1/2)*arctan((c+d*tan(f*x+e))^(1/2)/(-I*d-c)^(1/2)))+I/(I*c+d)/(I*c-d
)/(c+I*d)/(c+d*tan(f*x+e))^(1/2)+1/4*(-I*c^2+I*d^2+2*c*d)/(I*d-c)^(3/2)/(c+I*d)^2/d^2*arctan((c+d*tan(f*x+e))^
(1/2)/(I*d-c)^(1/2)))

________________________________________________________________________________________

Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))/(c+d*tan(f*x+e))^(3/2),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: Error executing code in Maxima: expt: undefined: 0 to a negative e
xponent.

________________________________________________________________________________________

Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1589 vs. \(2 (164) = 328\).
time = 1.53, size = 1589, normalized size = 7.75 \begin {gather*} -\frac {2 \, {\left ({\left (a c^{4} + 2 \, a c^{2} d^{2} + a d^{4}\right )} f e^{\left (4 i \, f x + 4 i \, e\right )} + {\left (a c^{4} + 2 i \, a c^{3} d + 2 i \, a c d^{3} - a d^{4}\right )} f e^{\left (2 i \, f x + 2 i \, e\right )}\right )} \sqrt {-\frac {i}{4 \, {\left (i \, a^{2} c^{3} + 3 \, a^{2} c^{2} d - 3 i \, a^{2} c d^{2} - a^{2} d^{3}\right )} f^{2}}} \log \left (-2 \, {\left (2 \, {\left ({\left (i \, a c^{2} + 2 \, a c d - i \, a d^{2}\right )} f e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (i \, a c^{2} + 2 \, a c d - i \, a d^{2}\right )} f\right )} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {-\frac {i}{4 \, {\left (i \, a^{2} c^{3} + 3 \, a^{2} c^{2} d - 3 i \, a^{2} c d^{2} - a^{2} d^{3}\right )} f^{2}}} - {\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} - c\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}\right ) - 2 \, {\left ({\left (a c^{4} + 2 \, a c^{2} d^{2} + a d^{4}\right )} f e^{\left (4 i \, f x + 4 i \, e\right )} + {\left (a c^{4} + 2 i \, a c^{3} d + 2 i \, a c d^{3} - a d^{4}\right )} f e^{\left (2 i \, f x + 2 i \, e\right )}\right )} \sqrt {-\frac {i}{4 \, {\left (i \, a^{2} c^{3} + 3 \, a^{2} c^{2} d - 3 i \, a^{2} c d^{2} - a^{2} d^{3}\right )} f^{2}}} \log \left (-2 \, {\left (2 \, {\left ({\left (-i \, a c^{2} - 2 \, a c d + i \, a d^{2}\right )} f e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (-i \, a c^{2} - 2 \, a c d + i \, a d^{2}\right )} f\right )} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {-\frac {i}{4 \, {\left (i \, a^{2} c^{3} + 3 \, a^{2} c^{2} d - 3 i \, a^{2} c d^{2} - a^{2} d^{3}\right )} f^{2}}} - {\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} - c\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}\right ) + {\left ({\left (a c^{4} + 2 \, a c^{2} d^{2} + a d^{4}\right )} f e^{\left (4 i \, f x + 4 i \, e\right )} + {\left (a c^{4} + 2 i \, a c^{3} d + 2 i \, a c d^{3} - a d^{4}\right )} f e^{\left (2 i \, f x + 2 i \, e\right )}\right )} \sqrt {-\frac {i \, c^{2} - 8 \, c d - 16 i \, d^{2}}{{\left (i \, a^{2} c^{5} - 5 \, a^{2} c^{4} d - 10 i \, a^{2} c^{3} d^{2} + 10 \, a^{2} c^{2} d^{3} + 5 i \, a^{2} c d^{4} - a^{2} d^{5}\right )} f^{2}}} \log \left (\frac {{\left (c^{2} + 5 i \, c d - 4 \, d^{2} + {\left ({\left (i \, a c^{3} - 3 \, a c^{2} d - 3 i \, a c d^{2} + a d^{3}\right )} f e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (i \, a c^{3} - 3 \, a c^{2} d - 3 i \, a c d^{2} + a d^{3}\right )} f\right )} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {-\frac {i \, c^{2} - 8 \, c d - 16 i \, d^{2}}{{\left (i \, a^{2} c^{5} - 5 \, a^{2} c^{4} d - 10 i \, a^{2} c^{3} d^{2} + 10 \, a^{2} c^{2} d^{3} + 5 i \, a^{2} c d^{4} - a^{2} d^{5}\right )} f^{2}}} + {\left (c^{2} + 4 i \, c d\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{2 \, {\left (-i \, a c^{3} + 3 \, a c^{2} d + 3 i \, a c d^{2} - a d^{3}\right )} f}\right ) - {\left ({\left (a c^{4} + 2 \, a c^{2} d^{2} + a d^{4}\right )} f e^{\left (4 i \, f x + 4 i \, e\right )} + {\left (a c^{4} + 2 i \, a c^{3} d + 2 i \, a c d^{3} - a d^{4}\right )} f e^{\left (2 i \, f x + 2 i \, e\right )}\right )} \sqrt {-\frac {i \, c^{2} - 8 \, c d - 16 i \, d^{2}}{{\left (i \, a^{2} c^{5} - 5 \, a^{2} c^{4} d - 10 i \, a^{2} c^{3} d^{2} + 10 \, a^{2} c^{2} d^{3} + 5 i \, a^{2} c d^{4} - a^{2} d^{5}\right )} f^{2}}} \log \left (\frac {{\left (c^{2} + 5 i \, c d - 4 \, d^{2} + {\left ({\left (-i \, a c^{3} + 3 \, a c^{2} d + 3 i \, a c d^{2} - a d^{3}\right )} f e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (-i \, a c^{3} + 3 \, a c^{2} d + 3 i \, a c d^{2} - a d^{3}\right )} f\right )} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {-\frac {i \, c^{2} - 8 \, c d - 16 i \, d^{2}}{{\left (i \, a^{2} c^{5} - 5 \, a^{2} c^{4} d - 10 i \, a^{2} c^{3} d^{2} + 10 \, a^{2} c^{2} d^{3} + 5 i \, a^{2} c d^{4} - a^{2} d^{5}\right )} f^{2}}} + {\left (c^{2} + 4 i \, c d\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{2 \, {\left (-i \, a c^{3} + 3 \, a c^{2} d + 3 i \, a c d^{2} - a d^{3}\right )} f}\right ) - 2 \, {\left (i \, c^{2} + i \, d^{2} + {\left (i \, c^{2} + 2 \, c d - 9 i \, d^{2}\right )} e^{\left (4 i \, f x + 4 i \, e\right )} - 2 \, {\left (-i \, c^{2} - c d + 4 i \, d^{2}\right )} e^{\left (2 i \, f x + 2 i \, e\right )}\right )} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}}{8 \, {\left ({\left (a c^{4} + 2 \, a c^{2} d^{2} + a d^{4}\right )} f e^{\left (4 i \, f x + 4 i \, e\right )} + {\left (a c^{4} + 2 i \, a c^{3} d + 2 i \, a c d^{3} - a d^{4}\right )} f e^{\left (2 i \, f x + 2 i \, e\right )}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))/(c+d*tan(f*x+e))^(3/2),x, algorithm="fricas")

[Out]

-1/8*(2*((a*c^4 + 2*a*c^2*d^2 + a*d^4)*f*e^(4*I*f*x + 4*I*e) + (a*c^4 + 2*I*a*c^3*d + 2*I*a*c*d^3 - a*d^4)*f*e
^(2*I*f*x + 2*I*e))*sqrt(-1/4*I/((I*a^2*c^3 + 3*a^2*c^2*d - 3*I*a^2*c*d^2 - a^2*d^3)*f^2))*log(-2*(2*((I*a*c^2
 + 2*a*c*d - I*a*d^2)*f*e^(2*I*f*x + 2*I*e) + (I*a*c^2 + 2*a*c*d - I*a*d^2)*f)*sqrt(((c - I*d)*e^(2*I*f*x + 2*
I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(-1/4*I/((I*a^2*c^3 + 3*a^2*c^2*d - 3*I*a^2*c*d^2 - a^2*d^3)*f^
2)) - (c - I*d)*e^(2*I*f*x + 2*I*e) - c)*e^(-2*I*f*x - 2*I*e)) - 2*((a*c^4 + 2*a*c^2*d^2 + a*d^4)*f*e^(4*I*f*x
 + 4*I*e) + (a*c^4 + 2*I*a*c^3*d + 2*I*a*c*d^3 - a*d^4)*f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) - ((a*c^4 + 2*a*c^2*d^2 + a*d^4)*f*e^(4*I*f
*x + 4*I*e) + (a*c^4 + 2*I*a*c^3*d + 2*I*a*c*d^3 - a*d^4)*f*e^(2*I*f*x + 2*I*e))*sqrt(-(I*c^2 - 8*c*d - 16*I*d
^2)/((I*a^2*c^5 - 5*a^2*c^4*d - 10*I*a^2*c^3*d^2 + 10*a^2*c^2*d^3 + 5*I*a^2*c*d^4 - a^2*d^5)*f^2))*log(1/2*(c^
2 + 5*I*c*d - 4*d^2 + ((-I*a*c^3 + 3*a*c^2*d + 3*I*a*c*d^2 - a*d^3)*f*e^(2*I*f*x + 2*I*e) + (-I*a*c^3 + 3*a*c^
2*d + 3*I*a*c*d^2 - a*d^3)*f)*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(-
(I*c^2 - 8*c*d - 16*I*d^2)/((I*a^2*c^5 - 5*a^2*c^4*d - 10*I*a^2*c^3*d^2 + 10*a^2*c^2*d^3 + 5*I*a^2*c*d^4 - a^2
*d^5)*f^2)) + (c^2 + 4*I*c*d)*e^(2*I*f*x + 2*I*e))*e^(-2*I*f*x - 2*I*e)/((-I*a*c^3 + 3*a*c^2*d + 3*I*a*c*d^2 -
 a*d^3)*f)) - 2*(I*c^2 + I*d^2 + (I*c^2 + 2*c*d - 9*I*d^2)*e^(4*I*f*x + 4*I*e) - 2*(-I*c^2 - c*d + 4*I*d^2)*e^
(2*I*f*x + 2*I*e))*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e) + 1)))/((a*c^4 + 2*a*c^
2*d^2 + a*d^4)*f*e^(4*I*f*x + 4*I*e) + (a*c^4 + 2*I*a*c^3*d + 2*I*a*c*d^3 - a*d^4)*f*e^(2*I*f*x + 2*I*e))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {i \int \frac {1}{c \sqrt {c + d \tan {\left (e + f x \right )}} \tan {\left (e + f x \right )} - i c \sqrt {c + d \tan {\left (e + f x \right )}} + d \sqrt {c + d \tan {\left (e + f x \right )}} \tan ^{2}{\left (e + f x \right )} - i d \sqrt {c + d \tan {\left (e + f x \right )}} \tan {\left (e + f x \right )}}\, dx}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))/(c+d*tan(f*x+e))**(3/2),x)

[Out]

-I*Integral(1/(c*sqrt(c + d*tan(e + f*x))*tan(e + f*x) - I*c*sqrt(c + d*tan(e + f*x)) + d*sqrt(c + d*tan(e + f
*x))*tan(e + f*x)**2 - I*d*sqrt(c + d*tan(e + f*x))*tan(e + f*x)), x)/a

________________________________________________________________________________________

Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 476 vs. \(2 (164) = 328\).
time = 0.81, size = 476, normalized size = 2.32 \begin {gather*} \frac {{\left (i \, c - 4 \, d\right )} \arctan \left (-\frac {2 \, {\left (\sqrt {d \tan \left (f x + e\right ) + c} c - \sqrt {c^{2} + d^{2}} \sqrt {d \tan \left (f x + e\right ) + c}\right )}}{c \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} + i \, \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} d - \sqrt {c^{2} + d^{2}} \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}}}\right )}{{\left (a c^{2} f + 2 i \, a c d f - a d^{2} f\right )} \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} {\left (\frac {i \, d}{c - \sqrt {c^{2} + d^{2}}} + 1\right )}} - \frac {{\left (-i \, d \tan \left (f x + e\right ) - i \, c\right )} c d - 5 \, {\left (d \tan \left (f x + e\right ) + c\right )} d^{2} + 4 \, c d^{2} + 4 i \, d^{3}}{2 \, {\left (a c^{3} f + i \, a c^{2} d f + a c d^{2} f + i \, a d^{3} f\right )} {\left (i \, {\left (d \tan \left (f x + e\right ) + c\right )}^{\frac {3}{2}} - i \, \sqrt {d \tan \left (f x + e\right ) + c} c + \sqrt {d \tan \left (f x + e\right ) + c} d\right )}} + \frac {i \, \arctan \left (\frac {2 \, {\left (\sqrt {d \tan \left (f x + e\right ) + c} c - \sqrt {c^{2} + d^{2}} \sqrt {d \tan \left (f x + e\right ) + c}\right )}}{c \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} - i \, \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} d - \sqrt {c^{2} + d^{2}} \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}}}\right )}{{\left (a c f - i \, a d f\right )} \sqrt {-2 \, c + 2 \, \sqrt {c^{2} + d^{2}}} {\left (-\frac {i \, d}{c - \sqrt {c^{2} + d^{2}}} + 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))/(c+d*tan(f*x+e))^(3/2),x, algorithm="giac")

[Out]

(I*c - 4*d)*arctan(-2*(sqrt(d*tan(f*x + e) + c)*c - sqrt(c^2 + d^2)*sqrt(d*tan(f*x + e) + c))/(c*sqrt(-2*c + 2
*sqrt(c^2 + d^2)) + I*sqrt(-2*c + 2*sqrt(c^2 + d^2))*d - sqrt(c^2 + d^2)*sqrt(-2*c + 2*sqrt(c^2 + d^2))))/((a*
c^2*f + 2*I*a*c*d*f - a*d^2*f)*sqrt(-2*c + 2*sqrt(c^2 + d^2))*(I*d/(c - sqrt(c^2 + d^2)) + 1)) - 1/2*((-I*d*ta
n(f*x + e) - I*c)*c*d - 5*(d*tan(f*x + e) + c)*d^2 + 4*c*d^2 + 4*I*d^3)/((a*c^3*f + I*a*c^2*d*f + a*c*d^2*f +
I*a*d^3*f)*(I*(d*tan(f*x + e) + c)^(3/2) - I*sqrt(d*tan(f*x + e) + c)*c + sqrt(d*tan(f*x + e) + c)*d)) + I*arc
tan(2*(sqrt(d*tan(f*x + e) + c)*c - sqrt(c^2 + d^2)*sqrt(d*tan(f*x + e) + c))/(c*sqrt(-2*c + 2*sqrt(c^2 + d^2)
) - I*sqrt(-2*c + 2*sqrt(c^2 + d^2))*d - sqrt(c^2 + d^2)*sqrt(-2*c + 2*sqrt(c^2 + d^2))))/((a*c*f - I*a*d*f)*s
qrt(-2*c + 2*sqrt(c^2 + d^2))*(-I*d/(c - sqrt(c^2 + d^2)) + 1))

________________________________________________________________________________________

Mupad [B]
time = 15.81, size = 2500, normalized size = 12.20 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/((a + a*tan(e + f*x)*1i)*(c + d*tan(e + f*x))^(3/2)),x)

[Out]

log(10*a*d^7*f - ((-(240*c^2*d^7 - 240*d^9 - c*d^8*720i + c^3*d^6*80i + 160*c^4*d^5 - c^5*d^4*32i - a^2*c^6*f^
2*(((1280*c^3*d^8 - 1200*c*d^10 + 208*c^5*d^6 + 32*c^7*d^4)/(a^2*c^8*f^2 + a^2*d^8*f^2 + 4*a^2*c^2*d^6*f^2 + 6
*a^2*c^4*d^4*f^2 + 4*a^2*c^6*d^2*f^2) + ((240*d^11 - 1920*c^2*d^9 + 240*c^4*d^7 + 96*c^6*d^5)*1i)/(a^2*c^8*f^2
 + a^2*d^8*f^2 + 4*a^2*c^2*d^6*f^2 + 6*a^2*c^4*d^4*f^2 + 4*a^2*c^6*d^2*f^2))^2 - 4*(256*d^6 + 256*c^2*d^4)*(((
24*c*d^7 + 6*c^3*d^5)*1i)/(a^4*c^8*f^4 + a^4*d^8*f^4 + 4*a^4*c^2*d^6*f^4 + 6*a^4*c^4*d^4*f^4 + 4*a^4*c^6*d^2*f
^4) + (16*d^8 - c^2*d^6 + c^4*d^4)/(a^4*c^8*f^4 + a^4*d^8*f^4 + 4*a^4*c^2*d^6*f^4 + 6*a^4*c^4*d^4*f^4 + 4*a^4*
c^6*d^2*f^4)))^(1/2)*1i + a^2*d^6*f^2*(((1280*c^3*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d^4)*(((24*c*d^7 + 6*c^3*d^5)*1i)/(a^4*c^8*f^4 + a^4*d^8*f^4 + 4*a^4*c^2*d^6*f^4 + 6*a^4*c^4*d^4*f^4 + 4*a^4*
c^6*d^2*f^4) + (16*d^8 - c^2*d^6 + c^4*d^4)/(a^4*c^8*f^4 + a^4*d^8*f^4 + 4*a^4*c^2*d^6*f^4 + 6*a^4*c^4*d^4*f^4
 + 4*a^4*c^6*d^2*f^4)))^(1/2)*1i)/(512*(d^6 + c^2*d^4)*(a^2*d^6*f^2*1i - a^2*c^6*f^2*1i + 2*a^2*c*d^5*f^2 + 2*
a^2*c^5*d*f^2 + a^2*c^2*d^4*f^2*1i + 4*a^2*c^3*d^3*f^2 - a^2*c^4*d^2*f^2*1i)))^(1/2)*(104*a^3*c*d^9*f^3 - a^3*
d^10*f^3*24i + a^3*c^2*d^8*f^3*24i + 216*a^3*c^3*d^7*f^3 + a^3*c^4*d^6*f^3*120i + 120*a^3*c^5*d^5*f^3 + a^3*c^
6*d^4*f^3*72i + 8*a^3*c^7*d^3*f^3 - 2*(c + d*tan(e + f*x))^(1/2)*(a^2*d^2*f^2 - a^2*c^2*f^2 + a^2*c*d*f^2*2i)*
(-(240*c^2*d^7 - 240*d^9 - c*d^8*720i + c^3*d^6*80i + 160*c^4*d^5 - c^5*d^4*32i - a^2*c^6*f^2*(((1280*c^3*d^8
- 1200*c*d^10 + 208*c^5*d^6 + 32*c^7*d^4)/(a^2*c^8*f^2 + a^2*d^8*f^2 + 4*a^2*c^2*d^6*f^2 + 6*a^2*c^4*d^4*f^2 +
 4*a^2*c^6*d^2*f^2) + ((240*d^11 - 1920*c^2*d^9 + 240*c^4*d^7 + 96*c^6*d^5)*1i)/(a^2*c^8*f^2 + a^2*d^8*f^2 + 4
*a^2*c^2*d^6*f^2 + 6*a^2*c^4*d^4*f^2 + 4*a^2*c^...

________________________________________________________________________________________